<?php

use Slim\Http\Request;
use Slim\Http\Response;


// 登录检查
$app->post('/login/checklogin', \Controllers\loginController::class.':checkLogin');
// 主页
$app->get('/index/index', \Controllers\indexController::class.':index');
// 项目列表
$app->get('/project/list', \Controllers\projectController::class.':projectList');
// 检查token
$app->post('/login/checktoken', \Controllers\loginController::class.':checkToken');
// 增加项目
$app->post('/project/add', \Controllers\projectController::class.':projectAdd');
// 获取申购表信息
$app->get('/project/tablesList', \Controllers\projectController::class.':tablesList');
// 获取物品信息
$app->get('/project/goodsList', \Controllers\projectController::class.':goodsList');
// 获取用户
$app->get('/user/list', \Controllers\managerController::class.':userList');
// 更新用户角色
$app->post('/user/updateRole', \Controllers\managerController::class.':updateRole');
// 更新用户密码
$app->post('/user/updatePw', \Controllers\managerController::class.':updatePw');
// 用户更改密码
$app->post('/user/changePw', \Controllers\managerController::class.':changePw');
// 增加用户
$app->post('/user/userAdd', \Controllers\managerController::class.':userAdd');
// 删除用户
$app->post('/user/userDel', \Controllers\managerController::class.':userDel');
// 启用用户
$app->post('/user/userEnable', \Controllers\managerController::class.':userEnable');
// 禁用用户
$app->post('/user/userDisable', \Controllers\managerController::class.':userDisable');
// 删除项目
$app->post('/project/projectDel', \Controllers\projectController::class.':projectDel');
// 删除申购表
$app->post('/project/tableDel', \Controllers\projectController::class.':tableDel');
// 删除物品表
$app->post('/project/goodsDel', \Controllers\projectController::class.':goodsDel');
// 获取某个项目的申购表
$app->get('/project/pTablesList', \Controllers\projectController::class.':pTablesList');
// 获取状态为0的申购表
$app->get('/project/mTablesList', \Controllers\projectController::class.':mTablesList');
// 获取状态为1的申购表
$app->get('/project/cTablesList', \Controllers\projectController::class.':cTablesList');
// 获取状态为3的申购表
$app->get('/project/wTablesList', \Controllers\projectController::class.':wTablesList');
// 获取状态为5的申购表
$app->get('/project/dTablesList', \Controllers\projectController::class.':dTablesList');
// 部门主管审核申购表
$app->post('/project/mTableCheck', \Controllers\projectController::class.':mTableCheck');
// 中心主管审核申购表
$app->post('/project/cTableCheck', \Controllers\projectController::class.':cTableCheck');
// 仓库物品列表
$app->get('/store/list', \Controllers\storeController::class.':storeList');

$app->post('/store/storeIn', \Controllers\storeController::class.':storeIn');

$app->get('/store/storeType', \Controllers\storeController::class.':storeType');

$app->post('/store/typeAdd', \Controllers\storeController::class.':typeAdd');

$app->POST('/store/typeUpdate', \Controllers\storeController::class.':typeUpdate');

$app->map(['OPTIONS', 'POST'], '/project/newApply', \Controllers\projectController::class.':newApply');

$app->map(['OPTIONS', 'POST'], '/project/pUserUpdate', \Controllers\projectController::class.':pUserUpdate');

$app->get('/project/details', \Controllers\projectController::class.':details');

$app->map(['OPTIONS', 'POST'], '/project/updateApply', \Controllers\projectController::class.':updateApply');

$app->map(['OPTIONS', 'POST'], '/project/goodAdd', \Controllers\projectController::class.':goodAdd');

$app->get('/project/inRecord', \Controllers\storeController::class.':inRecordList');

$app->get('/project/outRecord', \Controllers\storeController::class.':outRecordList');

$app->post('/store/receive', \Controllers\storeController::class.':receive');

$app->post('/store/back', \Controllers\storeController::class.':back');

$app->get('/store/receiveTable', \Controllers\storeController::class.':receiveTable');

$app->get('/store/backTable', \Controllers\storeController::class.':backTable');

$app->get('/store/myReceiveTable', \Controllers\storeController::class.':myReceiveTable');

$app->get('/store/myBackTable', \Controllers\storeController::class.':myBackTable');

$app->post('/store/receiveCheck', \Controllers\storeController::class.':receiveCheck');

$app->post('/store/backCheck', \Controllers\storeController::class.':backCheck');

$app->get('/store/dReceiveTable', \Controllers\storeController::class.':dReceiveTable');

$app->get('/store/dBackTable', \Controllers\storeController::class.':dBackTable');

$app->post('/store/updateRe', \Controllers\storeController::class.':updateRe');

$app->get('/project/fTablesList', \Controllers\projectController::class.':fTablesList');

$app->post('/store/reTableDel', \Controllers\storeController::class.':reTableDel');

$app->get('/test', \Controllers\managerController::class.':test');

$app->get('/user/roleList', \Controllers\managerController::class.':roleList');

$app->get('/project/pUserList', \Controllers\projectController::class.':pUserList');


$app->get('/project/aUserList', \Controllers\projectController::class.':aUserList');

$app->map(['OPTIONS', 'POST'], '/project/tableMerge', \Controllers\projectController::class.':tablesCombine');

// update the user phone
$app->post('/user/updatePhone', \Controllers\managerController::class.':updatePhone');

$app->get('/user/ipAndTime', \Controllers\managerController::class.':ipAndTime');

$app->get('/user/depAudit', \Controllers\managerController::class.':depAudit');

$app->get('/user/centerAudit', \Controllers\managerController::class.':centerAudit');

$app->get('/project/getCheckTable', \Controllers\projectController::class.':checkList');




































